<layout name="layout" />

<div class="main-div">
    <form name="main_form" method="POST" action="__SELF__" enctype="multipart/form-data" >
    	<input type="hidden" name="id" value="<?php echo $data['id']; ?>" />
        <table cellspacing="1" cellpadding="3" width="100%">
            <?php if($data['id']>1):?>
            <tr>
                <td class="label">管理员名称：</td>

                <td>
                    <?php foreach($roleData as $k=>$v):

                // 如何判断 ,1, 是否在 ,12,4,21,453,12, 字符串中
                // 问： strpos('1,2,3', '1');  的返回值：0 , 0 == false
                if(strpos(','.$roleId.',',','.$v['id'].',')!==FALSE){
                $checked='checked="checked"';
                }else{
                $checked="";
                }
                ?>
                    <input <?php echo $checked; ?> type="checkbox" name="role_id[]" value="<?php echo $v['id']; ?>" />
                    <?php echo $v['role_name']; ?><br/>
                <?php endforeach; ?>
                </td>
            </tr>
            <?php endif; ?>
            <tr>

                <td class="label">用户名：</td>

                <td>
                    <input type="text" size="25" name="username" value="<?php echo $data['username']?>" />

                </td>

            </tr>
            <tr>
                <td class="label">密码：</td>
                <td>
                    <input type="password" size="25" name="password" />
                </td>
            </tr>
            <tr>
                <td class="label">确认密码：</td>
                <td>
                    <input type="password" size="25" name="cpassword" />
                </td>
            </tr>
            <tr>
                <td colspan="99" align="center">
                    <input type="submit" class="button" value=" 确定 " />
                    <input type="reset" class="button" value=" 重置 " />
                </td>
            </tr>
        </table>
    </form>
</div>


<script>
</script>